//
//  NewsdataViewController.m
//  项目一
//
//  Created by 芮京 on 2018/10/8.
//  Copyright © 2018 芮京. All rights reserved.
//

#import "NewsdataViewController.h"
#import <WebKit/WebKit.h>
@interface NewsdataViewController ()

@end

@implementation NewsdataViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.navigationController.navigationBar.translucent=NO;
    
    self.view.backgroundColor=[UIColor whiteColor];
    
    //网页视图  IOS12 不要UIWebview
    WKWebView *webview=[[WKWebView alloc] initWithFrame:CGRectMake(0, -64, WIDTH, HEIGHT+64+49)];
    //将URLString 转换为 URL
    NSURL *URL=[NSURL URLWithString:self.urlstring];
    //创建请求对象
    NSURLRequest *request=[NSURLRequest requestWithURL:URL];
    
    //网页试图家在网页
    [webview loadRequest:request];
    
    
    [self.view addSubview:webview];
    
}


@end
